15. Types of Elements
Types of Elements
You have many different kinds of elements at your disposal. Almost all of them are either block or inline with the major differences being their default CSS styles. Check it out, here’s a list.
The elements for content sectioning are good for laying out things on the page. Notice that a lot of these have requirements for what should be inside the element, for example, an <article>
typically includes a heading as a child element.
Text content is good for text. There are a few from here that you’ve seen before, but there are some new ones as well.
There are also inline text semantics. You’ll see familiar elements like <em>
and <span>
, but you’ve got others like <code>
, which displays code in a monospace font. Also <data>
, <progress>
, <time>
, and others.
There are other categories, but take a look at the last category, a graveyard of old elements. This is evidence of the way the web used to be. Don’t use these. They might work, but they aren’t guaranteed to continue working because they are no longer supported. Stick with the other elements and you’ll be fine.
For the next quiz, you'll be asked to research these elements in order to select which ones should be used on an example website. Press "Next" to continue to the quiz.